how to create array of objects in javascript